<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<link rel="stylesheet" type="text/css" href="$!{basePath}/content/system/h5/css/common.css" /><!-- 初始化 -->
		<link rel="stylesheet" type="text/css" href="$!{basePath}/content/system/h5/css/font.css" /><!-- 阿里小图标 -->
		<link rel="stylesheet" type="text/css" href="$!{basePath}/content/system/h5/css/index.css" /><!-- 当前页面css -->
		<link rel="stylesheet" type="text/css" href="$!{basePath}/content/system/h5/css/person.css" />
		<link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm.min.css">
		<link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm-extend.min.css">
		<link rel="stylesheet" type="text/css" href="$!{basePath}/content/system/h5/css/mobile-ui1.0-compress.css"/>
		<script type='text/javascript' src='//g.alicdn.com/sj/lib/zepto/zepto.min.js' charset='utf-8'></script>
		<script src='//cdn.bootcss.com/jquery/3.1.1/jquery.min.js'></script>
		<script type='text/javascript' src='//g.alicdn.com/msui/sm/0.6.2/js/sm.min.js' charset='utf-8'></script>
		<script type='text/javascript' src='//g.alicdn.com/msui/sm/0.6.2/js/sm-extend.min.js' charset='utf-8'></script>
		<script src="$!{basePath}/content/system/h5/js/mobile-ui1.0-compress.js" type="text/javascript" charset="utf-8"></script>
		<script src="$!{basePath}/app/js/vue.min.js"></script>
		<script src="$!{basePath}/app/js/axios.min.js"></script>
		<style>
			.page{
				position: static !important;
			}
		</style>

		<title></title>
	</head>
	<body>
		<div class="myInfo">
			<div class="page">
				<div class="content">
					<div class="c_name">
						<div class="row">
							<div class="col-30">
								<div class="img">
									<img :src="info.user.userIcon">
								</div>
							</div>
							<div class="col-70">
								<div class="userName">
									<div class="text">{{info.user.userName}}</div>
									<div class="pinyin">{{info.user.userId}}</div>
								</div>
							</div>
						</div>
					</div>
					<div style="width: 95%;background-color: #ebebeb;height: 20px;margin: 0 auto;"></div>
					<div class="list">
						<div class="grxx flex">
							<div>
								<span>个人信息</span>
							</div>
							<div>
								<span class="iconfont icon-jiantou"></span>
							</div>
						</div>
						<div class="grxx flex">
							<div>
								<span v-if="info.wxStatus == 1">登录微信【<span style="color: green;">已绑</span>】</span>
								<span v-else>登录微信【<span style="color: red;">未绑定</span>】</span>
							</div>
							<div>
								<span class="iconfont icon-jiantou"></span>
							</div>
						</div>
						<div class="grxx flex last-list">
							<div>
								<span v-if="info.yhStatus == 1">优惠码【<span style="color: green;">已绑</span>】</span>
								<span v-else>优惠码【<span style="color: red;">未绑定</span>】</span>
							</div>
							<div>
								<span class="iconfont icon-jiantou"></span>
							</div>
						</div>
					</div>
					<div style="width: 95%;background-color: #ebebeb;height: 20px;margin: 0 auto;"></div>
					<div class="list">
						<div class="flex" @click="modify()">
							<div class="">
								<span >修改密码</span>
							</div>
							<div>
								<span class="iconfont icon-jiantou"></span>
							</div>
						</div>
						<div class="flex last-list" @click="logout()">
							<div>
								<span>安全退出</span>
							</div>
							<div>
								<span class="iconfont icon-jiantou"></span>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</body>
</html>
<script type="text/javascript">
	var app = new Vue({
		el: ".myInfo",
		data: {
			index: -1,
			isShow: false,
			info: {
				wxStatus: 0,
				yhStatus: 0,
				user: {
					userId: '',
					userName : '',
					userIcon: ''
				}
			}
		},
		created() {
			this.getdata()
		},
		methods: {
			getdata(){
				axios({
					url:"/app/home/person",
					method:"get"
				}).then((res)=>{
					this.info = res.data.obj
				})
			},
			modify() {
				window.location.href = "/app/home/toModifyPwd.do";
			},
			logout() {
				console.log("===========");
				MobileUi.init({
					title:'退出',
					text:'您确认退出吗？',
					type:1,
					callbak: function(){
						window.parent.logout();
					}
				})
			}
		}
	})
</script>
